<template>
    <div>
        <button @click="submit">创建错误</button>
    </div>
</template>

<script lang='ts' setup>
const route = useRoute()
const submit = async () => {
    const { data } = await useFetch(`/api/movies/${route.params.id}`)
    if (!data.value) {
        throw showError({
            statusCode: 404,
            statusMessage: '服务器错误，请联系开发人员',
            fatal: true,
        })
    }
}
</script>